package top.longmarch.flow.test;

import cn.hutool.json.JSONObject;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@LiteflowComponent(id = "ECmp", name = "ECmp")
public class ECmp extends NodeComponent {

    @Override
    public void process() throws Exception {
        log.info("ECmp executed!");
        JSONObject context = this.getContextBean(JSONObject.class);
        Integer x = context.getInt("x");
        Integer y = context.getInt("y");
        context.set("x", x + 10);
        context.set("y", y + 10);
    }

}
